#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <math.h>
#include <stdbool.h>
bool primei(int i)
{
    for (int j = 2; j * j <= i; j++)
    {
        if (i%j == 0)
        {
            return false;
        }
    }
    return true;
}
int main() {
    int n = 0;
    scanf("%d", &n);
    int z = 0;
    int arr[10] = { 0 };
    int a = 0;
    for (int i = 3; i <= n; i += 2)
    {
        if (primei(i))
        {
            arr[a++] = i;
            z++;
        }
    }
    printf("%d", z);
}